﻿
function reloadGridEmail() {
    $('#tSortablearticle').dataTable({
        "iDisplayLength": 5,
        "aLengthMenu": [5, 10, 25, 50, 100],
        "sPaginationType": "full_numbers",
        "iSortingCols": "STT"
    });
}


function Success(data) {
    if (data == "exist") {
        $.topAlertPopup({ "text": "Email has existed", "typeAlert": "error" });
    } else if (data == "wrong") {
        $.topAlertPopup({ "text": "Email is wrong format", "typeAlert": "error" });
    }
    else {
        if (data != "") {
            //alert("Cập nhật thành công");
            $.topAlertPopup({ "text": "Update completed", "typeAlert": "success" });
            $('#ID').val(data.ID);
            $('#Email').val(data.Email);
        }
        else {
            $.topAlertPopup({ "text": "Error, try agian please !", "typeAlert": "error" });
        }
    }
}

function SuccessSendMail(data) {
    if (data != "") {
        $.topAlertPopup({ "text": data, "typeAlert": "success" });
    }
}